/**
 * @author Steve Sedlmayr
 * @mail ssedlmayr@gmail.com
 * @link http://code.google.com/p/chitin/
 * @version 0.1
 
	The MIT License

	Copyright (c) 2009 Steve Sedlmayr

	Permission is hereby granted, free of charge, to any person obtaining a copy
	of this software and associated documentation files (the "Software"), to deal
	in the Software without restriction, including without limitation the rights
	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
	copies of the Software, and to permit persons to whom the Software is
	furnished to do so, subject to the following conditions:

	The above copyright notice and this permission notice shall be included in
	all copies or substantial portions of the Software.

	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
	THE SOFTWARE.
*/

package srs.chitin.mvstate.base 
{
	/** 
	 * Interface for the ViewBase class.
	 */
	internal interface IView {
		/** 
		 * Perform initialization here in concrete subclasses.
		 */
		function initialize() : void;
		
		/** 
		 * Perform display-list-relevant tasks here in subclasses.
		 */
		function draw() : void;
		
		/** 
		 * Adds a model to this view.
		 * 
		 * @param model The model to add to the view object.
		 * 
		 * @param name The name with which the model will be enumerated in the view.
		 */
		function addModel(model:ModelBase, name:String) : void;
		
		/** 
		 * Retrieve a model using its name as a key.
		 * 
		 * @param name The name of the model to retrieve from the view.
		 * 
		 * @return An instance of the model specified by the <code>name</code> parameter.
		 */
		function getModel(name:String) : ModelBase;
		
		/** 
		 * Adds a child view to this view.
		 * 
		 * @param view The child view to add to the current view.
		 * 
		 * @param name The name with which the child will be enumerated.
		 */
		function addView(view:ViewBase, name:String) : void;
		
		/** 
		 * Retrieve a child view by its name.
		 * 
		 * @param name The name of the child view to retrieve.
		 * 
		 * @return An instance of the child specified by the name.
		 * 
		 */
		function getView(name:String) : ViewBase;
	}
}